<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    body{
        text-align: center;
    }
    </style>
</head>
<body>
    <!--
      不改变内联和内联块的display属性，实现水平居中
      实现方案：
      parentElement{
          text-align:center;
      }
    -->
    <span>span</span> <br>
    <img src="images/icon1.png" alt="">
</body>
</html>